<div class="container"> 
	<div class="row"> 
		<div class="panel panel-info">
			<div class="panel-heading">
				<div class="panel-title">Expire Domains</div>
			</div>
			<div class="panel-body">
				<ul class="nav nav-tabs" role="tablist">
					<li><a href="<?php echo base_url('users/domain_manage/register')?>">My Domain</a></li>
					<li><a href="<?php echo base_url('users/domain_manage/dns')?>">DNS Hosted</a></li>
					<li><a href="<?php echo base_url('users/domain_manage/expiring')?>">Expiring</a></li>
					<li class="active"><a href="<?php echo base_url('users/domain_manage/expired')?>">Expired</a></li>
					<li><a href="<?php echo base_url('users/domain_manage/transfer')?>">My Transfer</a></li>
					<li><a href="<?php echo base_url('users/domain_manage/hosting')?>">My Hosting</a></li>
				</ul>
				<table class="table table-striped table-bordered">
					<thead>
						<tr class="success">
							<th>#</th>
							<th>Domain Name</th>
							<th>TLD</th>
							
							<th>Expire Date</th>
							<th>Status</th>
							<th>Renew Price</th>
							<th>Action</th>
						</tr>
					</thead>
					<tbody>
						<?php foreach($expired_domain as $domain){?>
						<tr>
							
							<td><input type="checkbox" value="<?=$domain['e_domain_id']?>" name="selected[]" /></td>
							<td><?=$domain['sld']?></td>
							<td><?=$domain['tld']?></td>
							<td><?=$domain['exp_date']?></td>
							<td>Expired</td>
							<td><?=$domain['renew_price']?></td>
							<td><a href="javascript:void(0)" onclick="addtocart('<?=$domain['sld']?>','<?=$domain['tld']?>');">Renew</a></td>
						</tr>
						<?}?>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
<script>
function addtocart(sld,tld)
{
	$.ajax({
		url: '<?php echo base_url('enom/addtocart');?>',
		type: 'post',
		data: 'sld=' + sld + '&tld=' + tld + '&product_id=16' + '&product_type=Renew' ,
		dataType: 'json',
		beforeSend: function() {
			
		},		
		complete: function() {
			
		},
		success: function(json) {
			if(json['message'])
			{
				$('#ajax_msg').html('<div class="alert alert-success alert-dismissable flashmsg"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>'+ json['message'] + '</div>');
				$('#ajax_msg .flashmsg').delay(5000).fadeOut('slow');
				$('html, body').animate({ scrollTop: 0 }, 'slow'); 
			}
			$.get('<?php echo base_url('enom/viewcart');?>', function(cart){
  				$(".cart_content").html(cart);
			});
		}
	});
}
</script>